<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>例子24-JS进阶（二）</title>
    </head>

    <body>
        <pre>
            <code>
                    // 例子24

                    var person = {
                        name: 'Tom',
                        age: '20',
                        getName: function() {
                            return this.name
                        }
                    }

                    person.name
                    person['name']
            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/24.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>

</html>